# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gtkmm3
pkgver=3.24.9
pkgrel=1
pkgdesc="C++ wrappers for GTK+"
url="https://www.gtkmm.org/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	meson
	gtk+3.0-dev
	cairomm-dev
	pangomm-dev
	gdk-pixbuf-dev
	atkmm-dev
	glibmm-dev
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev"
source="https://download.gnome.org/sources/gtkmm/${pkgver%.*}/gtkmm-$pkgver.tar.xz"
builddir="$srcdir/gtkmm-$pkgver"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dbuild-demos=false \
		-Dbuild-tests=true \
		. output
	meson compile -C output
}

check() {
	xvfb-run -a meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

dev() {
	default_dev
	amove usr/lib/'*'/proc/m4/
}

sha512sums="
6e6e53d7d434f51758ffddce00dbae61074c54a5d3a5bb852fea558147af4ca6c40f9fcf4e7f9fafcbbc22ea33cdd99ea06208b72542c7e75f4dca19a80c6724  gtkmm-3.24.9.tar.xz
"
